create  table jms_dm.dm_network_entry_port_aging_sign_network_sum_dt
(
end_agent_code            varchar(100) COMMENT '末端代理区code' ,
end_center_code           varchar(100) COMMENT '末端中心code' ,
end_franchisee_code       varchar(100) COMMENT '末端加盟商' ,
final_sign_network_code   varchar(100) COMMENT '末端网点' ,
end_agent_name            varchar(100) COMMENT '末端代理区' ,
end_center_name           varchar(100) COMMENT '末端中心' ,
end_franchisee_name       varchar(100) COMMENT '末端加盟商' ,
final_sign_network_name   varchar(100) COMMENT '末端网点' ,
order_source_code         varchar(100) COMMENT '订单来源code' ,
order_source_name         varchar(100) COMMENT '订单来源名字' ,
is_common                 varchar(100) COMMENT '是否共配' ,
need_departure_sum        int(12) COMMENT '应接件件数' ,
on_time_departure_sum     int(12) COMMENT '准点接件个数' ,
over_time_departure_sum   int(12) COMMENT '延误接件个数' ,
on_time_arrival_sum       int(12) COMMENT '准点到件数' ,
over_time_arrival_sum     int(12) COMMENT '延误到件数' ,
need_deliver_sum          int(12) COMMENT '应出仓总量' ,
on_time_deliver_sum       int(12) COMMENT '准点出仓总量' ,
over_time_deliver_sum     int(12) COMMENT '延误出仓总量' ,
aging_sign_on_time_sum    int(12) COMMENT '准点签收总量' ,
aging_sign_over_time_sum  int(12) COMMENT '延误签收总量' ,
 deliver_shift varchar(100) comment '班次'
,planned_departure_time varchar(100) comment '规划接件时间'
,planned_arrival_time varchar(100) comment '规划到达时间'
,no_scan_departure_sum int(12) comment '接件漏扫量'
,operate_later_departure_sum int(12) comment '接件操作不及时量'
,no_scan_arrival_sum int(12) comment '到件漏扫量'
,operate_later_arrival_sum int(12) comment '到件操作不及时量'
,warehouse_end_time varchar(100) comment '规划出仓时间'
,no_scan_deliver_sum int(12) comment '出仓漏扫量'
,operate_later_deliver_sum int(12) comment '出仓操作不及时量'
,on_time_deliver_township_sum int(12) comment '乡镇出仓及时量'
,on_time_no_township_deliver_sum int(12) comment '非乡镇出仓及时量'
date_time date comment'业务日期'
)
ENGINE=OLAP
DUPLICATE KEY(end_agent_code,end_center_code,end_franchisee_code,final_sign_network_code)
comment '网点进港时效网点汇总'
PARTITION BY RANGE (date_time) (
   START ("2023-02-26") END ("2023-04-27") EVERY (INTERVAL 1 day))DISTRIBUTED BY HASH(final_sign_network_code) BUCKETS 4
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-365",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);